;;; init-custom.el --- Behaviour specific to non-TTY frames -*- lexical-binding: t -*-
;;; Commentary:
;; In this section the following packages are loaded:
;; Centaur Tabs
;;; Code:

(defgroup kylin nil
  "Kylin Emacs customization."
  :group 'convenience
  :link '(url-link :tag "Homepage" "https://github.com/seagle0128/.emacs.d"))

(defcustom kylin-emacs-logo (expand-file-name
                         (if (display-graphic-p) "logo.png" "banner.txt")
                         user-emacs-directory)
  "Set Kylin logo. nil means official logo."
  :group 'kylin
  :type 'string)

(defcustom kylin-emacs-icon (or (display-graphic-p) (daemonp))
  "Display icons or not."
  :group 'kylin
  :type 'boolean)

(defcustom kylin-theme-alist
  '((default . doom-one)
    (pro     . doom-monokai-pro)
    (dark    . doom-dark+)
    (light   . doom-one-light)
    (warm    . doom-solarized-light)
    (cold    . doom-city-lights)
    (day     . doom-tomorrow-day)
    (night   . doom-tomorrow-night))
  "List of themes mapped to internal themes."
  :group 'kylin
  :type '(alist :key-type (symbol :tag "Theme")
                :value-type (symbol :tag "Internal theme")))

(defcustom kylin-auto-themes '(("8:00"  . doom-one-light)
				                 ("19:00" . doom-one))
  "List of themes mapped to the time they should be loaded.

The keywords `:sunrise' and `:sunset' can be used for the time
if `calendar-latitude' and `calendar-longitude' are set.
For example:
  '((:sunrise . doom-one-light)
    (:sunset  . doom-one))"
  :group 'kylin
  :type '(alist :key-type (string :tag "Time")
                :value-type (symbol :tag "Theme")))

(when (boundp 'ns-system-appearance)
  (defcustom kylin-system-themes '((light . doom-one-light)
				                     (dark  . doom-one))
    "List of themes related the system appearance. It's only available on macOS."
    :group 'kylin
    :type '(alist :key-type (symbol :tag "Appearance")
                  :value-type (symbol :tag "Theme"))))

(defcustom kylin-theme 'default
  "The color theme."
  :group 'kylin
  :type `(choice (const :tag "Auto" auto)
                 (const :tag "Random" random)
                 ,(if (boundp 'ns-system-appearance)
                      '(const :tag "System" system)
                    "")
                 ,@(mapcar
                    (lambda (item)
                      (let ((name (car item)))
                        (list 'const
                              :tag (capitalize (symbol-name name))
                              name)))
                    kylin-theme-alist)
                 symbol))

(defcustom kylin-completion-style 'childframe
  "Completion display style."
  :group 'kylin
  :type '(choice (const :tag "Minibuffer" minibuffer)
                 (const :tag "Child Frame" childframe)))

(defcustom kylin-emacs-dashboard (not (daemonp))
  "Use dashboard at startup or not.
If Non-nil, use dashboard, otherwise will restore previous session."
  :group 'kylin
  :type 'boolean)

(provide 'init-custom)
;;; init-custom.el ends here
